Python配置Pip国内源 您所在的位置:网站首页 pip 国内源配置 Python配置Pip国内源

Python配置Pip国内源

2024-07-16 01:54| 来源: 网络整理| 查看: 265

临时指定下载源

以阿里云的镜像为例

pip install --trusted-host https://mirrors.aliyun.com -i https://mirrors.aliyun.com/pypi/simple/ 设为默认,永久生效 Linux平台

Linux平台Pip配置文件为用户根目录下的:~/.pip/pip.conf,这里以阿里云镜像为例,添加如下内容

[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com timeout = 120 Windows平台

Windows平台Pip的配置文件路径为:C:\Users\pip\pip.ini

[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com timeout = 120 下面是国内其他境像源

清华:https://pypi.tuna.tsinghua.edu.cn/simple 华为云:https://repo.huaweicloud.com/repository/pypi/simple 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 华中理工大学:https://pypi.hustunique.com/ 山东理工大学:https://pypi.sdutlinux.org/ 豆瓣:https://pypi.douban.com/simple/

要切换为其他镜像源,配置方法是将上面例子的域名做对应修改即可



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有